import { requestClient } from '#/api/request';

// 获取食物列表
export async function $getlist(data: any) {
  return requestClient.get<any>('app/food', { params: data });
}

// 创建食物
export async function $createfood(data: any) {
  return requestClient.post<any>('app/food', data);
}


// 更新食物
export async function $updatefood(data: any, id: any) {
  return requestClient.put<any>(`app/food/${id}`, data);
}


// 删除食物
export async function $deletefood(data: any, id: any) {
  return requestClient.delete<any>(`app/food/${id}`, data);
}

// 获取食物详情
export async function $getdesc(id: any, data: any) {
  return requestClient.get<any>(`app/food/${id}`, { params: data });
}



